<template>
  <div class="basic-layout">
    <div class="header-fixed">
      <GlobalHeader />
    </div>
    <div class="main-content">
      <slot></slot>
    </div>
  </div>
</template>

<script setup lang="ts">
  import GlobalHeader from '@/components/GlobalHeader.vue'
</script>

<style scoped>
  .basic-layout {
    min-height: 100vh;
    background: var(--theme-background);
    transition: background 0.3s ease;
  }

  .header-fixed {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    z-index: 1000;
    background: var(--theme-surface);
    box-shadow: 0 2px 8px var(--theme-shadow);
    height: 70px;
    transition: all 0.3s ease;
  }

  .main-content {
    margin-top: 70px;
    min-height: calc(100vh - 70px);
    background: var(--theme-background);
    transition: background 0.3s ease;
  }

  #basicLayout .sider {
    background: #f7f8fa;
    border-right: 1px solid #e0e0e0;
    padding-top: 20px;
  }
  #basicLayout :deep(.ant-menu-root) {
    background: #f7f8fa !important;
  }
  #basicLayout :deep(.ant-menu-item) {
    color: #222 !important;
    font-weight: 500;
    font-size: 15px;
    border-radius: 8px;
    margin: 4px 0;
    background: transparent !important;
    transition: background 0.2s;
    position: relative;
  }
  #basicLayout :deep(.ant-menu-item-selected) {
    background: linear-gradient(90deg, #e0f0ff 80%, #f7f8fa 100%) !important;
    color: #0057b8 !important;
    box-shadow: 0 2px 8px #e0f0ff33;
  }
  #basicLayout :deep(.ant-menu-item-selected)::before {
    content: '';
    position: absolute;
    left: 0;
    top: 8px;
    bottom: 8px;
    width: 4px;
    border-radius: 4px;
    background: #1890ff;
    box-shadow: 0 0 8px #1890ff44;
  }
  #basicLayout :deep(.ant-menu-item:hover) {
    background: #e9ecf3 !important;
    color: #0057b8 !important;
  }
  #basicLayout .content {
    padding: 28px;
    background: #fff;
    margin-bottom: 28px;
    border-radius: 12px;
    box-shadow: 0 2px 8px #e0e0e033;
  }
  #basicLayout .footer {
    background: #f5f6fa;
    color: #666;
    padding: 16px;
    position: fixed;
    bottom: 0;
    left: 0;
    right: 0;
    text-align: center;
  }
</style>
